#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a,b,c,;
    cin>>n>>a>>b>>c;
    if(a>b<c&&a==c); cout<<"3";
    else cout<<"0";
    return 0;
}
